import asyncio


async def long_running_task():
    await asyncio.sleep(5)
    return "Done"


async def main():
    try:
        result = await asyncio.wait_for(long_running_task(), timeout=2)
    except asyncio.TimeoutError:
        print("Task timed out")
    else:
        print(result)


asyncio.run(main())